
package com.insigma.business.qrcode.job.service.impl;



import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.job.dao.JobRecruitPositionTypeDao;
import com.insigma.business.qrcode.job.dto.search.JobRecruitPositionTypeBSearcher;
import com.insigma.business.qrcode.job.entity.JobRecruitPositionTypeDO;
import com.insigma.business.qrcode.job.service.JobRecruitPositionTypeService;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("jobRecruitPositionTypeService")
public class JobRecruitPositionTypeServiceImpl implements JobRecruitPositionTypeService {

    @Autowired(required = false)
    private JobRecruitPositionTypeDao jobRecruitPositionTypeDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<JobRecruitPositionTypeDO> search(final JobRecruitPositionTypeBSearcher jobRecruitPositionTypeBSearcher) {
        return jobRecruitPositionTypeDao.search(jobRecruitPositionTypeBSearcher);
    }
   
    @Override
    public JobRecruitPositionTypeDO get(final String id){
        return jobRecruitPositionTypeDao.get(id);
    }

    
    @Override
    public Integer insert(final JobRecruitPositionTypeDO jobRecruitPositionTypeDO){
        jobRecruitPositionTypeDO.setId(sequenceGenerator.genKey(SequenceNameConstant.JOB_RECRUIT_POSITION_TYPE_ID));
        return jobRecruitPositionTypeDao.insert(jobRecruitPositionTypeDO);
    }

    
    @Override
    public Integer update(final JobRecruitPositionTypeDO jobRecruitPositionTypeDO){
        return jobRecruitPositionTypeDao.update(jobRecruitPositionTypeDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return jobRecruitPositionTypeDao.delete(id,modifierType,modifierId);
    }

    @Override
    public JobRecruitPositionTypeDO getByCode(String code) {
        return jobRecruitPositionTypeDao.getByCode(code);
    }

}
